<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui" template="template.xhtml">

	<ui:define name="head">

	</ui:define>
	<ui:define name="content">

		<h:form>
			<p:growl id="messages" />

			<h:panelGrid columns="3" cellpadding="5">
				<h:outputLabel value="Simple" for="acSimple" />
				<p:autoComplete id="acSimple" value="#{autoCompleteBean.text}"
					completeMethod="#{autoCompleteBean.complete}"
					selectListener="#{autoCompleteBean.handleSelect}"
					onSelectUpdate="messages" />
				<h:outputText id="acSimpleOut" value="#{autoCompleteBean.text}" />

				<h:outputLabel value="Pojo" for="acPojo" />
				<p:autoComplete id="acPojo"
					value="#{autoCompleteBean.selectedPlayer}"
					completeMethod="#{autoCompleteBean.completePlayer}" var="player"
					itemLabel="#{player.name}" itemValue="#{player}" converter="player"
					selectListener="#{autoCompleteBean.handleSelect}"
					onSelectUpdate="messages" />
				<h:outputText id="acPojoOut"
					value="#{autoCompleteBean.selectedPlayer.name}" />

			</h:panelGrid>

			<p:commandButton value="Submit" update="acSimpleOut acPojoOut" />

		</h:form>

	</ui:define>

</ui:composition>
